package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.SetmealDish;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface SetmealDishMapper {
    void saveBatch(@Param("setmealDishes") List<SetmealDish> setmealDishes);

    /**
     * 删除套餐对应的的套餐菜品
     *
     * @param ids 要删除套餐的id
     */
    void deleteBySetmealIds(@Param("ids") List<Long> ids);

    @Select("SELECT * FROM setmeal_dish WHERE setmeal_id=#{setmealId} ")
    List<SetmealDish> findByCategoryId(Long id);
}
